﻿using System;
using Castle.ActiveRecord;
using NHibernate.Expression;
using NHibernate;
using Hadlow.Jobvertizer.Models;
using Hadlow.Jobvertizer.Repositories;

namespace Hadlow.Jobvertizer.Repositories
{
    public class UserRepository : Repository<User>, Hadlow.Jobvertizer.Repositories.IUserRepository
    {
        public User GetUser(string username)
        {
            ICriterion usernameCriteria = Expression.Eq("Name", username);
            return FindOne(usernameCriteria);
        }
    }
}
